package com.itheima.d1_serialize;

import java.io.Serializable;

public class Teacher implements Serializable {
    private String name;
    private int age;
    String gender;

    //serialVersionUID的作用：保证存和读的类是同一个类！
    private static final long serialVersionUID = 10000000L;

    public Teacher() {
    }

    public Teacher(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
